#!/usr/bin/env bash


# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
#   Description: Run Throughput tests
#   Author: Christian Trautman <ctrautma@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
#   Copyright (c) 2017 Red Hat, Inc. All rights reserved.
#
#   This copyrighted material is made available to anyone wishing
#   to use, modify, copy, or redistribute it subject to the terms
#   and conditions of the GNU General Public License version 2.
#
#   This program is distributed in the hope that it will be
#   useful, but WITHOUT ANY WARRANTY; without even the implied
#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
#   PURPOSE. See the GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public
#   License along with this program; if not, write to the Free
#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
#   Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#######################################################################
# NIC Device names such as p6p1 p6p2
NIC1=""
NIC2=""

# PMD CPUS 
# Example with a layout such as seen from the output cpu_layout.py
# python cpu_layout.py
# ======================================================================
# Core and Socket Information (as reported by '/sys/devices/system/cpu')
# ======================================================================
#
# cores =  [0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13]
# sockets =  [0, 1]
#
#         Socket 0        Socket 1
#         --------        --------
# Core 0  [0, 24]         [1, 25]
# Core 1  [2, 26]         [3, 27]
# Core 2  [4, 28]         [5, 29]
# Core 3  [6, 30]         [7, 31]
# Core 4  [8, 32]         [9, 33]
# Core 5  [10, 34]        [11, 35]
# Core 8  [12, 36]        [13, 37]
# Core 9  [14, 38]        [15, 39]
# Core 10 [16, 40]        [17, 41]
# Core 11 [18, 42]        [19, 43]
# Core 12 [20, 44]        [21, 45]
# Core 13 [22, 46]        [23, 47]

# To user 44,20 ,if your NIC is on Numa 0 you would use PMD_CPU_1=44 PMD_CPU2=20
# To use cores 44,20 and 42,18 I would use  PMD_CPU_1=44 PMD_CPU2=20 PMD_CPU3=42 PMD_CPU4=18

PMD_CPU_1=""
PMD_CPU_2=""
PMD_CPU_3=""
PMD_CPU_4=""

# Virtual NIC Guest CPU Binding
# Using the same scripts above assign first VCPU to a single core. Then assign
# VCPU2 and VCPU3 to a core/HT pair such as 4,28. Should not be a core already
# in use by the PMD MASK. All CPU assignments should be on different
# Hyperthreads.

VCPU1=""
VCPU2=""
VCPU3=""

# Will need additional VCPUs for 2 queue test 
VCPU4=""
VCPU5=""


# TESTPMD descriptor size, can be used to modify descriptor sizes inside of VM when running TESTPMD for dpdk and kernel
# Throughput tests. SR-IOV options can be used to modify sr-iov descriptor sizes
TXD_SIZE=512
RXD_SIZE=512
SRIOV_TXD_SIZE=2048
SRIOV_RXD_SIZE=2048

# Update your Trex trafficgen info below
TRAFFICGEN_TREX_HOST_IP_ADDR=''

# Mac addresses of the ports configured in TRex Server
TRAFFICGEN_TREX_PORT1=''
TRAFFICGEN_TREX_PORT2=''

#SR-IOV Information
# To run SR-IOV tests please complete the following info
# NIC Device name for VF on NIC1 and NIC2 Example p6p1_0 for vf0 on p6p1
NIC1_VF=""
NIC2_VF=""

#IMAGE INFO 
ONE_QUEUE_IMAGE="http://netqe-bj.usersys.redhat.com/share/tli/vsperf_img/rhel7.6-vsperf-1Q-viommu.qcow2"
TWO_QUEUE_IMAGE="http://netqe-bj.usersys.redhat.com/share/tli/vsperf_img/rhel7.6-vsperf-2Q-viommu.qcow2"
#As dpdk-18.11.2-1.el7.x86_64.rpm ,version is 1811-2 ,must as this format.
DPDK_VER="1811-2"
DPDK_URL="http://download-node-02.eng.bos.redhat.com/brewroot/packages/dpdk/18.11.2/1.el7/x86_64/dpdk-18.11.2-1.el7.x86_64.rpm"
DPDK_TOOL_URL="http://download-node-02.eng.bos.redhat.com/brewroot/packages/dpdk/18.11.2/1.el7/x86_64/dpdk-tools-18.11.2-1.el7.x86_64.rpm"
#NOTICE:Both client and server must have same trex verion .
TREX_URL="http://netqe-bj.usersys.redhat.com/share/wanghekai/v2.59.tar.gz"

#config end 
################################################################################
